package com.videoadmin.servlet.filter;

import java.io.*;
import javax.servlet.*;

public class EncodingFilter implements Filter {
	public String charset;

	public void init(FilterConfig config) throws ServletException {
		this.charset = config.getInitParameter("charset");
	}

	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		request.setCharacterEncoding(this.charset);
		chain.doFilter(request, response);
	}

	public void destroy() {
	}
}